Skip to content

feat(plugin/timestamps): add indexStrategy option for entity indexing#332

Open
dswbx wants to merge 1 commit intorelease/0.21from
feat/timestamps-index
Open

feat(plugin/timestamps): add indexStrategy option for entity indexing#332
dswbx wants to merge 1 commit intorelease/0.21from
feat/timestamps-index

Conversation

@dswbx
Copy link
Contributor

@dswbx dswbx commented Jan 9, 2026

Addresses #325, related #326

Introduced a new indexStrategy option in the timestamps plugin to configure index generation for created_at and updated_at fields. Supports "composite" and "individual" strategies for better control over database indexing. Added test coverage for different index strategies.

import { timestamps } from "bknd/plugins";

export default {
   options: {
      plugins: [
         timestamps({ 
            entities: ["pages"],
            indexStrategy: "composite" // or "individual" to create separate indexes
         })
      ],
   },
} satisfies BkndConfig;

Introduced a new `indexStrategy` option in the timestamps plugin to configure index generation for `created_at` and `updated_at` fields. Supports "composite" and "individual" strategies for better control over database indexing. Added test coverage for different index strategies.
Copy link
Collaborator

@cameronapak cameronapak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Has my approval and blessing!

@cameronapak cameronapak changed the base branch from main to release/0.21 February 28, 2026 17:43
@cameronapak
Copy link
Collaborator

@dswbx this looks good to merge in for v0.21 release

@cameronapak cameronapak added bug Something isn't working Seems Ready to Merge This PR appears to be ready to merge into the next release Needs Feedback from Dennis Add this tag to any PR that needs Dennis's feedback or final sign off and removed Needs Feedback from Dennis Add this tag to any PR that needs Dennis's feedback or final sign off labels Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Needs Feedback from Dennis Add this tag to any PR that needs Dennis's feedback or final sign off Seems Ready to Merge This PR appears to be ready to merge into the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants